<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改广场动态')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-chatTrends-edit" th:object="${chatTrends}">
            <input name="trendsId" th:field="*{trendsId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建人Id：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">动态限制 (1公开的，2仅自己看)：</label>
                <div class="col-sm-8">
                    <input name="trendLimit" th:field="*{trendLimit}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">动态内容：</label>
                <div class="col-sm-8">
                    <input name="trendsContenttai" th:field="*{trendsContenttai}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">动态相册：</label>
                <div class="col-sm-8" th:each="gallery : *{galleryList}" >

<!--                    <input name="gallery" th:field="*{gallery}" class="form-control" type="text">-->

                <img  th:src="${gallery}"/>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">删除标志 1有效-1删除：</label>
                <div class="col-sm-8">
                    <input name="dataFlag" th:field="*{dataFlag}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">动态类型 1,原创,2,转发：</label>
                <div class="col-sm-8">
                    <select name="trendsType" class="form-control m-b" th:with="type=${@dict.getType('trends_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{trendsType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">转发原动态Id：</label>
                <div class="col-sm-8">
                    <input name="relayId" th:field="*{relayId}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "zangchat/chatTrends";
        $("#form-chatTrends-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-chatTrends-edit').serialize());
            }
        }
    </script>
</body>
</html>